<!DOCTYPE HTML>

<html lang="en">
<head>

<title>HttpSecurityBuilder (spring-security-docs 5.6.3 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="HttpSecurityBuilder (spring-security-docs 5.6.3 API)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">

<div class="topNav"><a id="navbar.top">

</a>
<div class="skipNav"><a href="HttpSecurityBuilder.html#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">

</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="HttpSecurityBuilder.html#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="HttpSecurityBuilder.html#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">

</a></div>

</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>

<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.springframework.security.config.annotation.web</a></div>
<h2 title="Interface HttpSecurityBuilder" class="title">Interface HttpSecurityBuilder&lt;H extends HttpSecurityBuilder&lt;H&gt;&gt;</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>H</code> - </dd>
</dl>
<dl>
<dt>All Superinterfaces:</dt>
<dd><code><a href="../SecurityBuilder.html" title="interface in org.springframework.security.config.annotation">SecurityBuilder</a>&lt;<a href="../../../web/DefaultSecurityFilterChain.html" title="class in org.springframework.security.web">DefaultSecurityFilterChain</a>&gt;</code></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="builders/HttpSecurity.html" title="class in org.springframework.security.config.annotation.web.builders">HttpSecurity</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">HttpSecurityBuilder&lt;H extends HttpSecurityBuilder&lt;H&gt;&gt;</span>
extends <a href="../SecurityBuilder.html" title="interface in org.springframework.security.config.annotation">SecurityBuilder</a>&lt;<a href="../../../web/DefaultSecurityFilterChain.html" title="class in org.springframework.security.web">DefaultSecurityFilterChain</a>&gt;</pre>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">

<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">

</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="HttpSecurityBuilder.html" title="type parameter in HttpSecurityBuilder">H</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="HttpSecurityBuilder.html#addFilter(javax.servlet.Filter)">addFilter</a></span>&#8203;(javax.servlet.Filter&nbsp;filter)</code></th>
<td class="colLast">
<div class="block">Adds a <code>Filter</code> that must be an instance of or extend one of the Filters
provided within the Security framework.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="HttpSecurityBuilder.html" title="type parameter in HttpSecurityBuilder">H</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="HttpSecurityBuilder.html#addFilterAfter(javax.servlet.Filter,java.lang.Class)">addFilterAfter</a></span>&#8203;(javax.servlet.Filter&nbsp;filter,
java.lang.Class&lt;? extends javax.servlet.Filter&gt;&nbsp;afterFilter)</code></th>
<td class="colLast">
<div class="block">Allows adding a <code>Filter</code> after one of the known <code>Filter</code> classes.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="HttpSecurityBuilder.html" title="type parameter in HttpSecurityBuilder">H</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="HttpSecurityBuilder.html#addFilterBefore(javax.servlet.Filter,java.lang.Class)">addFilterBefore</a></span>&#8203;(javax.servlet.Filter&nbsp;filter,
java.lang.Class&lt;? extends javax.servlet.Filter&gt;&nbsp;beforeFilter)</code></th>
<td class="colLast">
<div class="block">Allows adding a <code>Filter</code> before one of the known <code>Filter</code> classes.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="HttpSecurityBuilder.html" title="type parameter in HttpSecurityBuilder">H</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="HttpSecurityBuilder.html#authenticationProvider(org.springframework.security.authentication.AuthenticationProvider)">authenticationProvider</a></span>&#8203;(<a href="../../../authentication/AuthenticationProvider.html" title="interface in org.springframework.security.authentication">AuthenticationProvider</a>&nbsp;authenticationProvider)</code></th>
<td class="colLast">
<div class="block">Allows adding an additional <a href="../../../authentication/AuthenticationProvider.html" title="interface in org.springframework.security.authentication"><code>AuthenticationProvider</code></a> to be used</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>&lt;C extends <a href="../SecurityConfigurer.html" title="interface in org.springframework.security.config.annotation">SecurityConfigurer</a>&lt;<a href="../../../web/DefaultSecurityFilterChain.html" title="class in org.springframework.security.web">DefaultSecurityFilterChain</a>,&#8203;<a href="HttpSecurityBuilder.html" title="type parameter in HttpSecurityBuilder">H</a>&gt;&gt;<br>C</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="HttpSecurityBuilder.html#getConfigurer(java.lang.Class)">getConfigurer</a></span>&#8203;(java.lang.Class&lt;C&gt;&nbsp;clazz)</code></th>
<td class="colLast">
<div class="block">Gets the <a href="../SecurityConfigurer.html" title="interface in org.springframework.security.config.annotation"><code>SecurityConfigurer</code></a> by its class name or <code>null</code> if not
found.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>&lt;C&gt;&nbsp;C</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="HttpSecurityBuilder.html#getSharedObject(java.lang.Class)">getSharedObject</a></span>&#8203;(java.lang.Class&lt;C&gt;&nbsp;sharedType)</code></th>
<td class="colLast">
<div class="block">Gets a shared Object.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>&lt;C extends <a href="../SecurityConfigurer.html" title="interface in org.springframework.security.config.annotation">SecurityConfigurer</a>&lt;<a href="../../../web/DefaultSecurityFilterChain.html" title="class in org.springframework.security.web">DefaultSecurityFilterChain</a>,&#8203;<a href="HttpSecurityBuilder.html" title="type parameter in HttpSecurityBuilder">H</a>&gt;&gt;<br>C</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="HttpSecurityBuilder.html#removeConfigurer(java.lang.Class)">removeConfigurer</a></span>&#8203;(java.lang.Class&lt;C&gt;&nbsp;clazz)</code></th>
<td class="colLast">
<div class="block">Removes the <a href="../SecurityConfigurer.html" title="interface in org.springframework.security.config.annotation"><code>SecurityConfigurer</code></a> by its class name or <code>null</code> if
not found.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>&lt;C&gt;&nbsp;void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="HttpSecurityBuilder.html#setSharedObject(java.lang.Class,C)">setSharedObject</a></span>&#8203;(java.lang.Class&lt;C&gt;&nbsp;sharedType,
C&nbsp;object)</code></th>
<td class="colLast">
<div class="block">Sets an object that is shared by multiple <a href="../SecurityConfigurer.html" title="interface in org.springframework.security.config.annotation"><code>SecurityConfigurer</code></a>.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="HttpSecurityBuilder.html" title="type parameter in HttpSecurityBuilder">H</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="HttpSecurityBuilder.html#userDetailsService(org.springframework.security.core.userdetails.UserDetailsService)">userDetailsService</a></span>&#8203;(<a href="../../../core/userdetails/UserDetailsService.html" title="interface in org.springframework.security.core.userdetails">UserDetailsService</a>&nbsp;userDetailsService)</code></th>
<td class="colLast">
<div class="block">Allows adding an additional <a href="../../../core/userdetails/UserDetailsService.html" title="interface in org.springframework.security.core.userdetails"><code>UserDetailsService</code></a> to be used</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.springframework.security.config.annotation.SecurityBuilder">

</a>
<h3>Methods inherited from interface&nbsp;org.springframework.security.config.annotation.<a href="../SecurityBuilder.html" title="interface in org.springframework.security.config.annotation">SecurityBuilder</a></h3>
<code><a href="../SecurityBuilder.html#build()">build</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">

<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">

</a>
<h3>Method Detail</h3>
<a id="getConfigurer(java.lang.Class)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>getConfigurer</h4>
<pre class="methodSignature">&lt;C extends <a href="../SecurityConfigurer.html" title="interface in org.springframework.security.config.annotation">SecurityConfigurer</a>&lt;<a href="../../../web/DefaultSecurityFilterChain.html" title="class in org.springframework.security.web">DefaultSecurityFilterChain</a>,&#8203;<a href="HttpSecurityBuilder.html" title="type parameter in HttpSecurityBuilder">H</a>&gt;&gt;&nbsp;C&nbsp;getConfigurer&#8203;(java.lang.Class&lt;C&gt;&nbsp;clazz)</pre>
<div class="block">Gets the <a href="../SecurityConfigurer.html" title="interface in org.springframework.security.config.annotation"><code>SecurityConfigurer</code></a> by its class name or <code>null</code> if not
found. Note that object hierarchies are not considered.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>clazz</code> - the Class of the <a href="../SecurityConfigurer.html" title="interface in org.springframework.security.config.annotation"><code>SecurityConfigurer</code></a> to attempt to get.</dd>
</dl>
</li>
</ul>
<a id="removeConfigurer(java.lang.Class)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>removeConfigurer</h4>
<pre class="methodSignature">&lt;C extends <a href="../SecurityConfigurer.html" title="interface in org.springframework.security.config.annotation">SecurityConfigurer</a>&lt;<a href="../../../web/DefaultSecurityFilterChain.html" title="class in org.springframework.security.web">DefaultSecurityFilterChain</a>,&#8203;<a href="HttpSecurityBuilder.html" title="type parameter in HttpSecurityBuilder">H</a>&gt;&gt;&nbsp;C&nbsp;removeConfigurer&#8203;(java.lang.Class&lt;C&gt;&nbsp;clazz)</pre>
<div class="block">Removes the <a href="../SecurityConfigurer.html" title="interface in org.springframework.security.config.annotation"><code>SecurityConfigurer</code></a> by its class name or <code>null</code> if
not found. Note that object hierarchies are not considered.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>clazz</code> - the Class of the <a href="../SecurityConfigurer.html" title="interface in org.springframework.security.config.annotation"><code>SecurityConfigurer</code></a> to attempt to remove.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="../SecurityConfigurer.html" title="interface in org.springframework.security.config.annotation"><code>SecurityConfigurer</code></a> that was removed or null if not found</dd>
</dl>
</li>
</ul>
<a id="setSharedObject(java.lang.Class,java.lang.Object)">

</a><a id="setSharedObject(java.lang.Class,C)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setSharedObject</h4>
<pre class="methodSignature">&lt;C&gt;&nbsp;void&nbsp;setSharedObject&#8203;(java.lang.Class&lt;C&gt;&nbsp;sharedType,
                         C&nbsp;object)</pre>
<div class="block">Sets an object that is shared by multiple <a href="../SecurityConfigurer.html" title="interface in org.springframework.security.config.annotation"><code>SecurityConfigurer</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sharedType</code> - the Class to key the shared object by.</dd>
<dd><code>object</code> - the Object to store</dd>
</dl>
</li>
</ul>
<a id="getSharedObject(java.lang.Class)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>getSharedObject</h4>
<pre class="methodSignature">&lt;C&gt;&nbsp;C&nbsp;getSharedObject&#8203;(java.lang.Class&lt;C&gt;&nbsp;sharedType)</pre>
<div class="block">Gets a shared Object. Note that object heirarchies are not considered.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sharedType</code> - the type of the shared Object</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the shared Object or null if it is not found</dd>
</dl>
</li>
</ul>
<a id="authenticationProvider(org.springframework.security.authentication.AuthenticationProvider)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>authenticationProvider</h4>
<pre class="methodSignature"><a href="HttpSecurityBuilder.html" title="type parameter in HttpSecurityBuilder">H</a>&nbsp;authenticationProvider&#8203;(<a href="../../../authentication/AuthenticationProvider.html" title="interface in org.springframework.security.authentication">AuthenticationProvider</a>&nbsp;authenticationProvider)</pre>
<div class="block">Allows adding an additional <a href="../../../authentication/AuthenticationProvider.html" title="interface in org.springframework.security.authentication"><code>AuthenticationProvider</code></a> to be used</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>authenticationProvider</code> - the <a href="../../../authentication/AuthenticationProvider.html" title="interface in org.springframework.security.authentication"><code>AuthenticationProvider</code></a> to be added</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="builders/HttpSecurity.html" title="class in org.springframework.security.config.annotation.web.builders"><code>HttpSecurity</code></a> for further customizations</dd>
</dl>
</li>
</ul>
<a id="userDetailsService(org.springframework.security.core.userdetails.UserDetailsService)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>userDetailsService</h4>
<pre class="methodSignature"><a href="HttpSecurityBuilder.html" title="type parameter in HttpSecurityBuilder">H</a>&nbsp;userDetailsService&#8203;(<a href="../../../core/userdetails/UserDetailsService.html" title="interface in org.springframework.security.core.userdetails">UserDetailsService</a>&nbsp;userDetailsService)
              throws java.lang.Exception</pre>
<div class="block">Allows adding an additional <a href="../../../core/userdetails/UserDetailsService.html" title="interface in org.springframework.security.core.userdetails"><code>UserDetailsService</code></a> to be used</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>userDetailsService</code> - the <a href="../../../core/userdetails/UserDetailsService.html" title="interface in org.springframework.security.core.userdetails"><code>UserDetailsService</code></a> to be added</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="builders/HttpSecurity.html" title="class in org.springframework.security.config.annotation.web.builders"><code>HttpSecurity</code></a> for further customizations</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd>
</dl>
</li>
</ul>
<a id="addFilterAfter(javax.servlet.Filter,java.lang.Class)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>addFilterAfter</h4>
<pre class="methodSignature"><a href="HttpSecurityBuilder.html" title="type parameter in HttpSecurityBuilder">H</a>&nbsp;addFilterAfter&#8203;(javax.servlet.Filter&nbsp;filter,
                 java.lang.Class&lt;? extends javax.servlet.Filter&gt;&nbsp;afterFilter)</pre>
<div class="block">Allows adding a <code>Filter</code> after one of the known <code>Filter</code> classes. The
known <code>Filter</code> instances are either a <code>Filter</code> listed in
<a href="HttpSecurityBuilder.html#addFilter(javax.servlet.Filter)"><code>addFilter(Filter)</code></a> or a <code>Filter</code> that has already been added using
<a href="HttpSecurityBuilder.html#addFilterAfter(javax.servlet.Filter,java.lang.Class)"><code>addFilterAfter(Filter, Class)</code></a> or <a href="HttpSecurityBuilder.html#addFilterBefore(javax.servlet.Filter,java.lang.Class)"><code>addFilterBefore(Filter, Class)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filter</code> - the <code>Filter</code> to register after the type <code>afterFilter</code></dd>
<dd><code>afterFilter</code> - the Class of the known <code>Filter</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="builders/HttpSecurity.html" title="class in org.springframework.security.config.annotation.web.builders"><code>HttpSecurity</code></a> for further customizations</dd>
</dl>
</li>
</ul>
<a id="addFilterBefore(javax.servlet.Filter,java.lang.Class)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>addFilterBefore</h4>
<pre class="methodSignature"><a href="HttpSecurityBuilder.html" title="type parameter in HttpSecurityBuilder">H</a>&nbsp;addFilterBefore&#8203;(javax.servlet.Filter&nbsp;filter,
                  java.lang.Class&lt;? extends javax.servlet.Filter&gt;&nbsp;beforeFilter)</pre>
<div class="block">Allows adding a <code>Filter</code> before one of the known <code>Filter</code> classes. The
known <code>Filter</code> instances are either a <code>Filter</code> listed in
<a href="HttpSecurityBuilder.html#addFilter(javax.servlet.Filter)"><code>addFilter(Filter)</code></a> or a <code>Filter</code> that has already been added using
<a href="HttpSecurityBuilder.html#addFilterAfter(javax.servlet.Filter,java.lang.Class)"><code>addFilterAfter(Filter, Class)</code></a> or <a href="HttpSecurityBuilder.html#addFilterBefore(javax.servlet.Filter,java.lang.Class)"><code>addFilterBefore(Filter, Class)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filter</code> - the <code>Filter</code> to register before the type <code>beforeFilter</code></dd>
<dd><code>beforeFilter</code> - the Class of the known <code>Filter</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="builders/HttpSecurity.html" title="class in org.springframework.security.config.annotation.web.builders"><code>HttpSecurity</code></a> for further customizations</dd>
</dl>
</li>
</ul>
<a id="addFilter(javax.servlet.Filter)">

</a>
<ul class="blockListLast">
<li class="blockList">
<h4>addFilter</h4>
<pre class="methodSignature"><a href="HttpSecurityBuilder.html" title="type parameter in HttpSecurityBuilder">H</a>&nbsp;addFilter&#8203;(javax.servlet.Filter&nbsp;filter)</pre>
<div class="block">Adds a <code>Filter</code> that must be an instance of or extend one of the Filters
provided within the Security framework. The method ensures that the ordering of the
Filters is automatically taken care of.
The ordering of the Filters is:
<ul>
<li><a href="../../../web/access/channel/ChannelProcessingFilter.html" title="class in org.springframework.security.web.access.channel"><code>ChannelProcessingFilter</code></a></li>
<li><a href="../../../web/context/SecurityContextPersistenceFilter.html" title="class in org.springframework.security.web.context"><code>SecurityContextPersistenceFilter</code></a></li>
<li><a href="../../../web/authentication/logout/LogoutFilter.html" title="class in org.springframework.security.web.authentication.logout"><code>LogoutFilter</code></a></li>
<li><a href="../../../web/authentication/preauth/x509/X509AuthenticationFilter.html" title="class in org.springframework.security.web.authentication.preauth.x509"><code>X509AuthenticationFilter</code></a></li>
<li><a href="../../../web/authentication/preauth/AbstractPreAuthenticatedProcessingFilter.html" title="class in org.springframework.security.web.authentication.preauth"><code>AbstractPreAuthenticatedProcessingFilter</code></a></li>
<li><a href="../../../cas/web/CasAuthenticationFilter.html">CasAuthenticationFilter</a></li>
<li><a href="../../../web/authentication/UsernamePasswordAuthenticationFilter.html" title="class in org.springframework.security.web.authentication"><code>UsernamePasswordAuthenticationFilter</code></a></li>
<li><a href="../../../openid/OpenIDAuthenticationFilter.html" title="class in org.springframework.security.openid"><code>OpenIDAuthenticationFilter</code></a></li>
<li><a href="../../../web/authentication/ui/DefaultLoginPageGeneratingFilter.html" title="class in org.springframework.security.web.authentication.ui"><code>DefaultLoginPageGeneratingFilter</code></a></li>
<li><a href="../../../web/authentication/ui/DefaultLogoutPageGeneratingFilter.html" title="class in org.springframework.security.web.authentication.ui"><code>DefaultLogoutPageGeneratingFilter</code></a></li>
<li><a href="../../../web/session/ConcurrentSessionFilter.html" title="class in org.springframework.security.web.session"><code>ConcurrentSessionFilter</code></a></li>
<li><a href="../../../web/authentication/www/DigestAuthenticationFilter.html" title="class in org.springframework.security.web.authentication.www"><code>DigestAuthenticationFilter</code></a></li>
<li><a href="../../../oauth2/server/resource/web/BearerTokenAuthenticationFilter.html" title="class in org.springframework.security.oauth2.server.resource.web"><code>BearerTokenAuthenticationFilter</code></a></li>
<li><a href="../../../web/authentication/www/BasicAuthenticationFilter.html" title="class in org.springframework.security.web.authentication.www"><code>BasicAuthenticationFilter</code></a></li>
<li><a href="../../../web/savedrequest/RequestCacheAwareFilter.html" title="class in org.springframework.security.web.savedrequest"><code>RequestCacheAwareFilter</code></a></li>
<li><a href="../../../web/servletapi/SecurityContextHolderAwareRequestFilter.html" title="class in org.springframework.security.web.servletapi"><code>SecurityContextHolderAwareRequestFilter</code></a></li>
<li><a href="../../../web/jaasapi/JaasApiIntegrationFilter.html" title="class in org.springframework.security.web.jaasapi"><code>JaasApiIntegrationFilter</code></a></li>
<li><a href="../../../web/authentication/rememberme/RememberMeAuthenticationFilter.html" title="class in org.springframework.security.web.authentication.rememberme"><code>RememberMeAuthenticationFilter</code></a></li>
<li><a href="../../../web/authentication/AnonymousAuthenticationFilter.html" title="class in org.springframework.security.web.authentication"><code>AnonymousAuthenticationFilter</code></a></li>
<li><a href="../../../web/session/SessionManagementFilter.html" title="class in org.springframework.security.web.session"><code>SessionManagementFilter</code></a></li>
<li><a href="../../../web/access/ExceptionTranslationFilter.html" title="class in org.springframework.security.web.access"><code>ExceptionTranslationFilter</code></a></li>
<li><a href="../../../web/access/intercept/FilterSecurityInterceptor.html" title="class in org.springframework.security.web.access.intercept"><code>FilterSecurityInterceptor</code></a></li>
<li><a href="../../../web/authentication/switchuser/SwitchUserFilter.html" title="class in org.springframework.security.web.authentication.switchuser"><code>SwitchUserFilter</code></a></li>
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filter</code> - the <code>Filter</code> to add</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="builders/HttpSecurity.html" title="class in org.springframework.security.config.annotation.web.builders"><code>HttpSecurity</code></a> for further customizations</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>

<footer role="contentinfo">
<nav role="navigation">

<div class="bottomNav"><a id="navbar.bottom">

</a>
<div class="skipNav"><a href="HttpSecurityBuilder.html#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">

</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="HttpSecurityBuilder.html#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="HttpSecurityBuilder.html#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">

</a></div>

</nav>
</footer>
<script>if (window.parent == window) {(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-2728886-23', 'auto', {'siteSpeedSampleRate': 100});ga('send', 'pageview');}</script><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v652eace1692a40cfa3763df669d7439c1639079717194" integrity="sha512-Gi7xpJR8tSkrpF7aordPZQlW2DLtzUlZcumS8dMQjwDHEnw9I7ZLyiOj/6tZStRBGtGgN6ceN6cMH8z7etPGlw==" data-cf-beacon='{"rayId":"7040d031cc9a980c","token":"bffcb8a918ae4755926f76178bfbd26b","version":"2021.12.0","si":100}' crossorigin="anonymous"></script>
</body>
</html>
